package icu.zhhll.mybatis.mapper;


import icu.zhhll.mybatis.model.Student;
import icu.zhhll.mybatis.page.Page;
import icu.zhhll.mybatis.page.PageParam;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

/**
 * @author zh
 * @date 2021/4/14 18:30
 */
public interface StudentMapper {


    @Select("select * from student where class_id = #{classId}")
    @Results(
            {
                    @Result(id = true, column = "id", property = "id"),
                    @Result(column = "name", property = "name")
            }
    )
    Page<Student> getByClassIdPage(@Param(value = "classId") int classId, @Param(value = "pageParam") PageParam pageParam);


}
